/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
 */

package com.huawei.housekeeper.common.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import lombok.Data;

import java.util.Date;

/**
 * baseEntity
 *
 * @author l84165417
 * @since  2022/1/26 17:28
 */
@Data
@SuppressFBWarnings({"EI_EXPOSE_REP","EI_EXPOSE_REP2"})
public class BaseEntity {
    /**
     * 业务主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 创建时间
     */
    @TableField(value = "CREATED_TIME", updateStrategy = FieldStrategy.NEVER, fill = FieldFill.INSERT)
    private Date createdTime;

    /**
     * 创建人
     */
    @TableField(value = "CREATED_BY", updateStrategy = FieldStrategy.NEVER, fill = FieldFill.INSERT)
    private String createdBy;

    /**
     * 修改时间
     */
    @TableField(value = "UPDATED_TIME", fill = FieldFill.INSERT_UPDATE)
    private Date updatedTime;

    /**
     * 修改人
     */
    @TableField(value = "UPDATED_BY", fill = FieldFill.INSERT_UPDATE)
    private String updatedBy;
}